INCLUDE := -I /usr/local/include/caffe -I /usr/local/include
LIBRARIES := -L"/usr/local/caffe/lib" -L"/usr/lib" -L"/usr/local/lib" -L"/usr/lib/x86_64-linux-gnu" -Wl,-Bstatic -lamber_helper -Wl,-Bdynamic -lcaffe -lglog -lprotobuf -llmdb -lopencv_core -lopencv_imgproc -lopencv_highgui -lboost_filesystem -lboost_system
CXX := g++
CXXFLAGS := -std=c++11 $(INCLUDE)
LD := g++
LDFLAGS := $(LIBRARIES)

all: bin/convert-image-data bin/crop-images

clean:
	rm -rf ./bin/* ./build/*

bin/convert-image-data: build/convert-image-data.o
	$(LD) -o $@ $^ $(LDFLAGS)

build/convert-image-data.o: src/convert-image-data.cpp
	$(CXX) -c -o $@ $< $(CXXFLAGS)

bin/crop-images: build/crop-images.o
	$(LD) -o $@ $^ $(LDFLAGS)

build/crop-images.o: src/crop-images.cpp
	$(CXX) -c -o $@ $< $(CXXFLAGS)
